//	--------------------------------------------------------------------
//	Copyright(C) 2006,2007 Zhao Yukun. All rights reserved.
//	This file is a part of the Xeres system.
//	Xeres 2007
//	Contact : xeres.engine@gmail.com
//	$(reservedInfo)
//	$(reservedDeclaration)
//	--------------------------------------------------------------------
///	@file	<CConstantIndex9.h>
///	@path	~/src/graphics/dx9/
///	@date	2009/01/11
///	@desc	.

#pragma once

#include "xeres.h"

#include "graphics/IVertexIndex.h"
#include "graphics/dx9/CDevice9.h"
#include "graphics/dx9/CBaseIndex9.h"

namespace xeres {

	/*! 
		\class	CConstantIndex9
		\brief
	*/
	class CConstantIndex9 : public CBaseIndex9
	{
	public:

		/// \ctor
		CConstantIndex9( IDirect3DIndexBuffer9 * buffer , size_t count );

		/// \dtor
		virtual ~CConstantIndex9( void );

		DECL_IOBJECT_CLASS( CConstantIndex9 , CBaseIndex9 );

	public:

		/// \name Index Buffer Interface
		//@{

		/// \impl
		virtual bool Map( bool discard , ResourceMap& data );

		/// \impl
		virtual bool ReadBack( ResourceMap& data , bool readonly );

		/// \impl
		virtual bool Unmap( void );

		//@}
	};
	
} // namespace xeres
